Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Duende.​IdentityServer.​Services.​ICache<​T>

Assembly: Duende.IdentityServer

Abstract interface to model data caching

Methods

GetAsync​(string key)
Gets the cached data based upon a key index.
Returns The cached item, or <c>null</c> if no item matches the key.
key The key.
GetOrAddAsync​(string key, System.​TimeSpan duration, System.​Func<​System.​Threading.​Tasks.​Task<​T>> get)
Gets the cached data based upon a key index. If the item is not found, the <c>get</c> function is used to obtain the item and populate the cache.
Returns The cached item.
key The key.
duration The duration.
get The function to obtain the item.
SetAsync​(string key, T item, System.​TimeSpan expiration)
Caches the data based upon a key
key The key.
item The item.
expiration The expiration.
RemoveAsync​(string key)
Removes the cached data based upon a key index.
key The key.